package com.shijunhao.graduation.service.business;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shijunhao.graduation.domain.dto.DiscussDto;
import com.shijunhao.graduation.domain.entity.BusinessNoteDiscuss;
import com.shijunhao.graduation.domain.vo.DiscussVo;
import com.shijunhao.graduation.service.system.BaseService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shijunhao
 * @since 2022-04-09
 */
public interface IBusinessNoteDiscussService extends BaseService<BusinessNoteDiscuss> {

    /**
     * @param dto: 文章评论插入实体
     * @return: java.lang.Long
     * @author: shijunhao
     * @date: 2022/4/9 21:23
     * @description: 插入一条文章评论
     */
    Long insert(DiscussDto dto);

    /**
     * @param entity: 实体转显示对象
     * @return: com.shijunhao.graduation.domain.vo.DiscussVo
     * @author: shijunhao
     * @date: 2022/4/9 21:37
     * @description:
     */
    DiscussVo toVo(BusinessNoteDiscuss entity);

    /**
     * @param nid: 文章id
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.shijunhao.graduation.domain.vo.DiscussVo>
     * @author: shijunhao
     * @date: 2022/4/10 16:30
     * @description: 获取文章评论信息
     */
    IPage<DiscussVo> page(IPage<BusinessNoteDiscuss> curPage,Long nid);

    /**
     * @param id: 评论id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/4/27 4:27
     * @description: 删除对应评论
     */
    boolean delete(Long id);

    /**
     * @param id: 问贴id
     * @return: com.shijunhao.graduation.domain.vo.DiscussVo
     * @author: shijunhao
     * @date: 2022/5/23 15:46
     * @description: 获得问贴置顶评论id
     */
    DiscussVo top(Long id);

    /**
     * @param did: 回答id
     * @param nid: 问贴id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/5/23 17:03
     * @description: 置顶或取消置顶
     */
    boolean toTop(Long nid,Long did);
}
